package org.mtmi.ui.scenes;

import java.util.HashMap;
import java.util.Map;

import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;

/**
 * Singleton class to handle properly colors for controls and scene.
 * {@link #dispose()} method should be called when no more color is used.
 * @author jgout
 *
 * @deprecated 
 */
public class ColorManager {

//	private static ColorManager instance;
//	private Map<COLOR, Color> colors;
//	
//	private ColorManager() {
//		Display display = Display.getDefault();
//		colors = new HashMap<COLOR, Color>();
//		colors.put(COLOR.sceneFg, new Color(display, 250, 250, 250));
//		colors.put(COLOR.sceneBg, new Color(display, 12, 12, 12));
//		colors.put(COLOR.buttonTappedBg, new Color(display, 180, 180, 180));
//		colors.put(COLOR.buttonTappedFg, new Color(display, 50, 50, 50));
//		colors.put(COLOR.sliderBg, new Color(display, 230, 230, 230));
//		colors.put(COLOR.sliderThumbBg, new Color(display, 80, 80, 80));
//		colors.put(COLOR.red, new Color(display, 255, 0, 0));
//		colors.put(COLOR.yellow, new Color(display, 255, 255, 0));
//		colors.put(COLOR.dark_blue, new Color(display, 0, 0, 180));
//		addGreys(display);
//	}
//
//	private void addGreys(Display display) {
//		colors.put(COLOR.grey0, new Color(display, 0, 0, 0));
//		colors.put(COLOR.grey5, new Color(display, 13, 13, 13));
//		colors.put(COLOR.grey10, new Color(display, 26, 26, 26));
//		colors.put(COLOR.grey20, new Color(display, 51, 51, 51));
//		colors.put(COLOR.grey30, new Color(display, 77, 77, 77));
//		colors.put(COLOR.grey40, new Color(display, 102, 102, 102));
//		colors.put(COLOR.grey50, new Color(display, 128, 128, 128));
//		colors.put(COLOR.grey60, new Color(display, 153, 153, 153));
//		colors.put(COLOR.grey70, new Color(display, 179, 179, 179));
//		colors.put(COLOR.grey80, new Color(display, 204, 204, 204));
//		colors.put(COLOR.grey90, new Color(display, 230, 230, 230));
//		colors.put(COLOR.grey100, new Color(display, 255, 255, 255));
//	}
//
//	private static ColorManager getInstance() {
//		if(instance == null) {
//			instance = new ColorManager();
//		}
//		return instance;
//	}
//	
//	private void dispose() {
//		for (Color c : colors.values()) {
//			if(!c.isDisposed()) {
//				c.dispose();
//			}
//		}
//	}
//
//	private Color getColor(COLOR c) {
//		return colors.get(c);
//	} 
}
